<template>
	<view class="statement">
		<view class="repair_main" v-for="(item,index) in arrList" :key="index">
			<view class="title" v-if="item.title!=''">
				<view class="repair-left" />
				<text>{{item.title}}</text>
			</view>
			<view class="title2" v-if="item.title2&&item.title2!=''">
				<text>{{item.title2}}</text>
			</view>
			<view class="card-detail">
				<view class="ful-detail">
					<view class="detail-left">{{item.name}}</view>
					<view class="detail-right" v-if="item.form_type == 'text'"
						:style="{backgroundColor:isPdf?'#fff':'#F5F6F8'}">
						<u--textarea border="none" v-model="item.value" auto-height height="40" :disabled="isPdf" placeholder=" " autoHeight
							placeholder-style="font-size: 28rpx;color: #999999;backgroundColor:#999999;"></u--textarea>
					</view>
					<view class="detail-right" v-if="item.form_type == 'select'"
						:style="{backgroundColor:isPdf?'#fff':'#F5F6F8'}">
						<view style="flex: 1;">
							<radio-group @change="(e)=>changeR(e,index)">
								<label style="margin-right: 20px;" v-for="(i,ind) in item.setting">
									<radio :value="i" :checked="item.value==(ind+1)" :disabled="isPdf">{{i}}</radio>
								</label>
							</radio-group>
						</view>
						<view class="title3" v-if="item.title3&&item.title3!=''">
							<text>{{item.title3}}</text>
						</view>
					</view>
					<view class="detail-right" v-if="item.form_type == 'select2'"
						:style="{backgroundColor:isPdf?'#fff':'#F5F6F8'}">
						<view class="dis f_13" v-for="(i,ind) in item.setting">
							<view class="">{{i.set_name}}</view>
							<view class="">
								<view style="flex: 1;">
									<radio-group>
										<label style="margin-right: 20px;" v-for="(j,jin) in i.value">
											<radio :value="j">{{j}}</radio>
										</label>
									</radio-group>
								</view>
							</view>
						</view>
					</view>
					<view class="border_" v-if="isPdf" />
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			arrList: {
				type: Array,
				default: [{
						form_type: "text",
						title: "系统状态检查",
						title2: "",
						name: "客户对设备运行的描述",
						setting: [],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						title2: "",
						name: "作系统 “Check Up”和图像质量的“Daily”检查",
						setting: ["✔", "/"],
						value: ""
					}, {
						form_type: "select",
						title: "",
						title2: "",
						name: "系统预评价",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "text",
						title: "",
						title2: "",
						name: "X-射线管曝光秒数",
						setting: [],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						title2: "设备使用环境状态",
						name: "机房温度摄氏度 （建议22-24度）",
						setting: ["✔", "/"],
						value: ""
					}, {
						form_type: "select",
						title: "",
						title2: "",
						name: "机房湿度%RH (建议40%-70%RH）",
						setting: ["✔", "/"],
						value: ""
					}, {
						form_type: "select",
						title: "",
						title2: "",
						name: "输入电A相Vac（与设备设置比对）",
						setting: ["✔", "/"],
						value: ""
					}, {
						form_type: "select",
						title: "",
						title2: "",
						name: "输入电B相Vac（与设备设置比对）",
						setting: ["✔", "/"],
						value: ""
					}, {
						form_type: "select",
						title: "",
						title2: "",
						name: "输入电C相Vac（与设备设置比对）",
						setting: ["✔", "/"],
						value: ""
					}, {
						form_type: "text",
						title: "",
						title2: "",
						name: "设备故障信息（代码摘录）",
						setting: [],
						value: ""
					},
					{
						form_type: "select",
						title: "安全检查",
						title2: "",
						name: "设备关机状态下，检查机房紧急停机按钮功能",
						setting: ["✔", "/"],
						value: ""
					},

					{
						form_type: "select",
						title: "",
						title2: "",
						name: "设备开机状态下，检查Stop Buttom功能",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						title2: "",
						name: "设备可视性检查",
						setting: ["✔", "/"],
						value: ""
					}, {
						form_type: "select",
						title: "",
						title2: "",
						name: "设备线缆外观检查",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						title2: "",
						name: "机架配重固定检查",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						title2: "",
						name: "检查安全标签",
						setting: ["✔", "/"],
						value: ""
					}, {
						form_type: "select",
						title: "",
						title2: "",
						name: "检查机房门开关连锁",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						title2: "",
						name: "机架旋转驱动皮带磨损检查",
						setting: ["✔", "/"],
						value: ""
					}, {
						form_type: "select",
						title: "",
						title2: "",
						name: "检查CT床固定地脚螺丝",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						title2: "",
						name: "检查床运动轴承及间距",
						setting: ["✔", "/"],
						value: ""
					}, {
						form_type: "select",
						title: "",
						title2: "",
						name: "X射线切断功能",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						title2: "",
						name: "检查X线曝光指示灯",
						setting: ["✔", "/"],
						value: ""
					}, {
						form_type: "select",
						title: "",
						title2: "",
						name: "滑动机架（选配）：检查机架外观",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						title2: "",
						name: "滑动机架（选配）：系统电缆外观检查",
						setting: ["✔", "/"],
						value: ""
					}, {
						form_type: "select",
						title: "",
						title2: "",
						name: "滑动机架（选配）：齿形带检查",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						title2: "",
						name: "滑动机架（选配）：检查机架前后开关组",
						setting: ["✔", "/"],
						value: ""
					}, {
						form_type: "select",
						title: "",
						title2: "",
						name: "滑动机架（选配）：保护导线连接检查",
						setting: ["✔", "/"],
						value: ""
					},

					{
						form_type: "select",
						title: "功能检查",
						title2: "",
						name: "检查CT床固定附件",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						title2: "",
						name: "检查机架旋转驱动皮带张紧度",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						title2: "",
						name: "检查CT床水平运动驱动皮带张紧度（PHS-1A)",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						title2: "",
						name: "检查机架旋转刹车",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						title2: "",
						name: "检查质检模体",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						title2: "",
						name: "检查配电箱中浪涌保护器状态",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						title2: "",
						name: "检查机架门挂钩",
						setting: ["✔", "/"],
						value: ""
					},

					{
						form_type: "select",
						title: "设备润滑",
						title2: "",
						name: "润滑CT床垂直升降电机丝杆",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						title2: "",
						name: "润滑CT床水平驱动丝杆",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						title2: "",
						name: "润滑CT床板运动导轨",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						title2: "",
						name: "润滑机架主轴承",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						title2: "",
						name: "润滑准直器轴承",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "清洁设备及检查/更换备件",
						title2: "",
						name: "用吸尘器清除滑环的碳粉及机架内灰尘及出风口",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						title2: "",
						name: "检查机架散热风扇（断电时用手转动）",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						title2: "",
						name: "清洁/检查/更换565V电源碳刷",
						setting: ["清洁", "检查", "更换"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						title2: "",
						name: "清洁/检查/更换325V电源碳刷",
						setting: ["清洁", "检查", "更换"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						title2: "",
						name: "清洁/检查/更换信号碳刷",
						setting: ["清洁", "检查", "更换"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						title2: "",
						name: "清洁/检查扫描野有机玻璃窗及插槽",
						setting: ["清洁", "检查"],
						value: ""
					}, {
						form_type: "select",
						title: "",
						title2: "",
						name: "清洁/更换机架空气过滤网",
						setting: ["清洁", "更换"],
						value: ""
					}, {
						form_type: "select",
						title: "",
						title2: "",
						name: "清洁/检查X射线球管冷却器",
						setting: ["清洁", "检查"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						title2: "",
						name: "检查机架倾斜（前后30度倾斜操作）",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						title2: "",
						name: "检查储能中电容库是否有渗漏液",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						title2: "",
						name: "清洁计算机内部及外部尘土",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						title2: "",
						name: "清洁计算机柜",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						title2: "",
						name: "启动时检查计算机风扇",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "软件维护",
						title2: "",
						name: "使用硬盘参数表格进行备份",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						title2: "",
						name: "使用光盘进行参数表格备份",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						title2: "",
						name: "检查系统和数据库分区的剩余空间，清理垃圾文件",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						title2: "",
						name: "连接工作站,确认畅通",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "图像质量检测",
						title2: "",
						name: "选用Constancy完成图像质量检测",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "系统接地保护电阻测试",
						title2: "",
						name: "检查机架保护接地电阻：要求小于300毫欧姆",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						title2: "",
						name: "检查CT床保护接地电阻：要求小于300毫欧姆",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						title2: "",
						name: "检查电源箱保护接地电阻：要求小于100毫欧姆",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						title2: "",
						name: "检查计算机保护接地电阻：要求小于300毫欧姆",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "床漏电流检测",
						title3: "数值为（从右侧PDS保护接地端子到床板，在床板上贴上铜箔)[AC],数值为（从右侧PDS保护接地端子到床板，在床板上贴上铜箔)[DC]",
						title2: "",
						name: "床板部分：要求小于0.1A[AC]和0.01A[DC]",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title3: "心电线到地线端子0.1A[AC],心电线到地线端子0.01A[DC],心电线到床板铜箔0.1A[AC],心电线到床板铜箔0.01A[DC]",
						title2: "",
						title: "",
						name: "心电导联线(选配)：要求小于0.1A[AC]和0.01A[DC]（如果没有请填写N.A）",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "外观清洁",
						title2: "",
						name: "机架外观清洁",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						title2: "",
						name: "病床外观清洁",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "text",
						title: "保养结论",
						title2: "",
						name: "设备状态",
						setting: [],
						value: ""
					}, {
						form_type: "text",
						title: "",
						title2: "",
						name: "未完成事宜和后续跟进",
						setting: [],
						value: ""
					}
				]
			},
			isPdf: {
				type: Boolean,
				default: false
			},
		},
		data() {
			return {

			}
		},

		methods: {
			changeR(e, index) {
				let arr = ['清洁', '检查', '更换']
				let res = arr.includes(e.detail.value)
				if (!res) {
					this.arrList[index].value = e.detail.value == '✔' ? 1 : 2
				} else {
					this.arrList[index].value = e.detail.value == '清洁' ? 1 : (e.detail.value == '检查' ? 2 : 3)
				}
				console.log(this.arrList[index].value,'-----------')
			},
			getArr() {
				this.$emit('geArr', this.arrList)
			},
		}
	}
</script>

<style lang="scss" scoped>
	/deep/ u-textarea {
		background-color: transparent !important;
	}

	.repair_main {
		margin: 20rpx 0;
		background-color: #fff;
		border-radius: 20rpx;
		overflow: hidden;
	}

	.repair-left {
		width: 10rpx;
		height: 32rpx;
		margin-right: 10rpx;
		background-color: #1A66FF;
	}

	.title {
		padding: 16rpx 12rpx;
		background-color: #fff;
		font-size: 32rpx;
		font-family: PingFang SC-Regular, PingFang SC;
		font-weight: 600;
		color: #434343;
		display: flex;
		align-items: center;
		justify-content: flex-start;
	}

	.title2 {
		padding: 12rpx;
		background-color: #fff;
		font-size: 28rpx;
		font-family: PingFang SC-Regular, PingFang SC;
		font-weight: 600;
		color: #434343;
		display: flex;
		align-items: center;
		justify-content: flex-start;
	}

	.title3 {
		margin-top: 10rpx;
		padding: 12rpx;
		background-color: #fff;
		font-size: 28rpx;
		font-family: PingFang SC-Regular, PingFang SC;
		font-weight: 400;
		color: #434343;
		display: flex;
		align-items: center;
		justify-content: flex-start;
	}

	.border_ {
		height: 2rpx;
		background-color: #EBEEF1;
	}

	.dis {
		display: flex;
		align-items: center;
		justify-content: space-between;
	}

	.f_13 {
		font-size: 26rpx;
		margin-bottom: 16rpx;
	}

	.card-detail {
		background-color: #FFFFFF;

		.ful-detail {
			margin: 0 10rpx;
			padding: 20rpx 10rpx 6rpx;

			.detail-left {
				font-size: 28rpx;
				font-weight: 500;
				margin-bottom: 14rpx;
				color: #3B3D3D;
				line-height: 33rpx;
			}

			.detail-right {
				font-size: 28rpx;
				font-weight: 500;
				color: #000;
				padding: 14rpx 20rpx;
				line-height: 50rpx;
			}
		}
	}

	/* 设置input框提示内容的样式 */
	input::-webkit-input-placeholder {
		color: #434343;
	}

	/*webkit 内核浏览器*/
	input::-moz-placeholder {
		color: #434343;
	}

	/*Mozilla Firefox 19+*/
	input:-moz-placeholder {
		color: #434343;
	}

	/*Mozilla Firefox 4 to 18*/
	input:-ms-input-placeholder {
		color: #434343;
	}

	/* 设置textarea框提示内容的样式 */
	textarea::-webkit-input-placeholder {
		color: #434343;
	}

	/*webkit 内核浏览器*/
	textarea::-moz-placeholder {
		color: #434343;
	}

	/*Mozilla Firefox 19+*/
	textarea:-moz-placeholder {
		color: #434343;
	}

	/*Mozilla Firefox 4 to 18*/
	textarea:-ms-input-placeholder {
		color: #434343;
	}

	/deep/ .xp-picker-mask {
		z-index: 222;
	}
</style>